using System.Collections.Generic;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal abstract class OracleLpSelectTerm : OracleLpStatementElement, IOracleLpColumnDescriptorContainer
	{
		protected OracleLpSelectTermType m_vType;

		protected List<OracleLpColumnDescriptor> m_vColumnDescriptors;

		internal override OracleLpStatementElementType ElementType => OracleLpStatementElementType.SelectTerm;

		public OracleLpSelectTermType Type => m_vType;

		public List<OracleLpColumnDescriptor> ColumnDescriptors
		{
			get
			{
				if (m_vColumnDescriptors == null)
				{
					Resolve();
				}
				return m_vColumnDescriptors;
			}
		}

		public OracleLpSelectTerm(OracleLpSelectClause sc)
			: base(sc)
		{
		}

		public abstract void Resolve();
	}
}
